if Variable DENALI_X86 Equals FALSE
  Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Express 2012
  Set Variable DENALI_FILEBAG_X86 to 
  Set Variable DENALI_RESULT_X86 to 
  Set Variable DENALI_ERROR_X86 to 
  Get Common Folder Location Special->Boot Path into DENALI_BOOTPATH_X86
  Does File Exist $DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\Windows6.0-KB956250-x86.MSU (get result into variable DENALI_UPDATED_X86)
  Define File Bag : #IADIR#\runtimes\denalibin_x86.7zip, include files recursively, get runtime location of files into variable DENALI_FILEBAG_X86
  Extract 7Zip Archive $DENALI_FILEBAG_X86$\denalibin_x86.7zip into folder $DENALI_BOOTPATH_X86$ (get result into variable DENALI_EXTRACT_X86)
  if Variable DENALI_EXTRACT_X86 not Equals SUCCESS
    MessageBox: $TITLE$ Setup, Unable to extract temporary files for Microsoft SQL Server Express 2012 installation. $DENALI_EXTRACT_X86$$NEWLINE$$NEWLINE$Please free up some space on your boot drive and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
  if Variable DENALI_ISSEVEN_X86 Equals FALSE
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Vista Update for Microsoft SQL Server Express 2012
    Set Variable PROGRESSMODE to MARQUEE
    Run Program wusa.exe "$DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\Windows6.0-KB956250-x86.MSU" /quiet /norestart (WAIT)
    Set Variable PROGRESSMODE to 
    Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Express 2012
  else
    Set Variable DENALI_UPDATED_X86 to TRUE
  end
  Get System Setting Logged on Computer Name into SQL_COMPUTER_NAME
  Get System Setting Logged on User Name into SQL_USER_NAME
  Set Variable PROGRESSMODE to MARQUEE
  Set Variable DENALI_COMMAND_LINE_X86 to /q /ACTION=Install /SECURITYMODE=SQL /SAPWD="System2008#" /INSTANCENAME="PALLADIUMSQL" /FEATURES=SQLEngine,Replication,SDK /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSYSADMINACCOUNTS="$SQL_COMPUTER_NAME$\$SQL_USER_NAME$" /IAcceptSQLServerLicenseTerms=TRUE
  Run Program $DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\setup.exe $DENALI_COMMAND_LINE_X86$ (WAIT, get result into variable DENALI_RESULT_X86)
  Set Variable PROGRESSMODE to 
  if Variable DENALI_RESULT_X86 Equals 3010
    Recursively Delete Files $DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\*.*
    Call DLL Function kernel32.dll->RemoveDirectoryA
    MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
    if Variable REBOOTNOW Equals OK
      Reboot Computer and Resume Setup
    else
      Terminate Installation
    end
  else
    if Variable DENALI_RESULT_X86 not Equals 0
      if Variable DENALI_UPDATED_X86 Equals FALSE
        MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
        if Variable REBOOTNOW Equals OK
          Reboot Computer and Resume Setup
        else
          Terminate Installation
        end
      end
      Recursively Delete Files $DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\*.*
      Call DLL Function kernel32.dll->RemoveDirectoryA
      MessageBox: $TITLE$ Setup, Microsoft SQL Server Express 2012 could not be installed. Please use Windows Update to manually install this update on your system.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      Recursively Delete Files $DENALI_BOOTPATH_X86$\en_sql_server_2012_express_sqlexpr_x86_x64_wow\*.*
      Call DLL Function kernel32.dll->RemoveDirectoryA
    end
  end
end
 
